<?php 
require './封装.php';
$str=[
"host"=>"127.0.0.1",
"root"=>"root",
"root"=>"root",
'dbname'=>'db'
];
$obj=new Db($str);
$sql="select count(*) from products";
$total=$obj->select($sql)[0][0];
// echo $total;

$size=10;
$totalpage=ceil($total/$size);
for($i=1;$i<$totalpage;$i++){
    echo $i;
}

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <table>
    <tr>
    <th>商品编号</th>
    <th>商品名称</th>
    <th>规格</th>
    <th>价格</th>
    </tr>
    <tr>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    </tr>
    
    </table>
</body>
</html>